Fix more tests
authorAleksey Kladov <aleksey.kladov@gmail.com>
Sun, 9 Jul 2017 13:27:08 +0000 (16:27 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Sun, 9 Jul 2017 13:30:27 +0000 (16:30 +0300)
tests/bench.rs
tests/cross-compile.rs

index b9adbf46693ac09bbae09c68342cfa4a0666a534..ec2374a0fa58b9ce527c26cde8bdcf6296f8dd13 100644 (file)
@@ -16,7 +16,7 @@ fn cargo_bench_simple() {
 
     let p = project("foo")
         .file("Cargo.toml", &basic_bin_manifest("foo"))
-        .file("src/foo.rs", r#"
+        .file("src/main.rs", r#"
             #![feature(test)]
             extern crate test;
 
@@ -153,7 +153,7 @@ fn cargo_bench_verbose() {
 
     let p = project("foo")
         .file("Cargo.toml", &basic_bin_manifest("foo"))
-        .file("src/foo.rs", r#"
+        .file("src/main.rs", r#"
             #![feature(test)]
             extern crate test;
             fn main() {}
@@ -163,7 +163,7 @@ fn cargo_bench_verbose() {
     assert_that(p.cargo_process("bench").arg("-v").arg("hello"),
                 execs().with_stderr(&format!("\
 [COMPILING] foo v0.5.0 ({url})
-[RUNNING] `rustc [..] src[/]foo.rs [..]`
+[RUNNING] `rustc [..] src[/]main.rs [..]`
 [FINISHED] release [optimized] target(s) in [..]
 [RUNNING] `[..]target[/]release[/]deps[/]foo-[..][EXE] hello --bench`", url = p.url()))
                        .with_stdout_contains("test bench_hello ... bench: [..]"));
@@ -213,7 +213,7 @@ fn cargo_bench_failing_test() {
 
     let p = project("foo")
         .file("Cargo.toml", &basic_bin_manifest("foo"))
-        .file("src/foo.rs", r#"
+        .file("src/main.rs", r#"
             #![feature(test)]
             extern crate test;
             fn hello() -> &'static str {
@@ -245,7 +245,7 @@ thread '[..]' panicked at 'assertion failed: \
     `(left == right)`[..]", p.url()))
                        .with_stderr_contains("[..]left: `\"hello\"`[..]")
                        .with_stderr_contains("[..]right: `\"nope\"`[..]")
-                       .with_stderr_contains("[..]src[/]foo.rs:14[..]")
+                       .with_stderr_contains("[..]src[/]main.rs:14[..]")
                        .with_status(101));
 }
 
index 3054185b6672b1f98bdbfa87952340695ed058e3..55ba530a792cff8cc690084a81093fb872c6a016 100644 (file)
@@ -528,7 +528,7 @@ fn cross_tests() {
             [[bin]]
             name = "bar"
         "#)
-        .file("src/main.rs", &format!(r#"
+        .file("src/bin/bar.rs", &format!(r#"
             extern crate foo;
             use std::env;
             fn main() {{